Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / PostScript Imaging Messages


GXPostScriptScanPrinterText

QuickDraw GX sends the GXPostScriptScanPrinterText message after getting a printer data message back from the printer to interpret and prepare the printer string. You can override the GXPostScriptScanPrinterText message if the printer string contains information you wish to use or if the device to which the workstation is connected has a format different from that of Apple LaserWriters. Your override of the GXPostScriptScanPrinterText message must match the following formal declaration:

OSErr MyPostScriptScanPrinterText (Handle printerTextHdl);
printerTextHdl
A handle to the text returned in the GXPostScriptGetPrinterText message.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends the GXPostScriptScanPrinterText message every time any text is returned from the GXPostScriptGetPrinterText message (that is, when this message does not return an empty buffer). The GXPostScriptScanPrinterText message interprets the text of the printer string to determine the state of the printing process. It performs error detection and reporting, using the Postscript scan ('scan') resource to interpret the string.

The default implementation of this message searches the text string for special keywords that determine the status of the printing device. It also reformats the string for reading by a user and calls the GXReportStatus function to display the string in the desktop printer window.

You need to override this message when part or all of the printer string holds some piece of information that is only meaningful to you or if the device to which the workstation is connected has a format different from that of Apple LaserWriters. Only the Apple LaserWriter format is understood by the default implementation of this message.

SPECIAL CONSIDERATIONS
You can partially or totally override the GXPostScriptScanPrinterText message.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
The default implementation of the GXPostScriptScanPrinterText message can also return the communications errors that are listed in Table 4-2 on page 4-42.

SEE ALSO
The GXPostScriptGetPrinterText message is described on page 4-107.

An example of using the GXPostScriptGetPrinterText and GXPostScriptScanPrinterText messages is shown in Listing 4-1 on page 4-109.

The GXReportStatus functon is described on page 5-17 in the chapter "Printing Functions for Message Overrides."


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help